<!DOCTYPE html>
<!-- saved from url=(0031)http://w.weipaitang.com/my/sale -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="format-detection" content="telephone=no">
<link href="<?php echo TEMPLATE_SITE_URL;?>/css/common.css" type="text/css" rel="stylesheet">
<link href="<?php echo TEMPLATE_SITE_URL;?>/css/sale.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto.js" charset="utf-8"></script>
<title>我的已卖拍品</title>
</head>
<body>
<div id="contentbox">
  <div class="topMenu">
    <div class="buyAndSell"> 
      <a href="index.php?act=my&op=userorder&userid=<?php echo intval($_GET['userid']);?>" class="buy">买买买</a>
      <div class="sell now">卖卖卖</div>
    </div>
    <ul>
      <li onclick="javascript:location.href='index.php?act=my&op=sellerorder';">全　部</li>
      <li onclick="javascript:location.href='index.php?act=my&op=sellerorder&state=0';">待付款</li>
      <li onclick="javascript:location.href='index.php?act=my&op=sellerorder&state=1';">未发货</li>
      <li onclick="javascript:location.href='index.php?act=my&op=sellerorder&state=2';">待收货</li>
      <li class="selected" onclick="javascript:location.href='index.php?act=my&op=sellerorderliupai'">流拍</li>
    </ul>
    <div class="search" onclick="javascript:location.href='index.php?act=my&op=search'"></div>
  </div>
  <div class="orderMain">
  	<?php if(!empty($output['list'])){?>
  	<?php foreach($output['list'] as $val){?>
    <div class="orderItem">
      <div class="title" style="background-image: url(<?php echo $val['avatar'];?>)">
        <div class="nickname"><a href="<?php echo BASE_SITE_URL;?>/index.php?act=my&op=home&uid=<?php echo $val['user_id'];?>&user_id=<?php  echo $val['seller_id'];?>"><?php echo $val['seller_name'];?></a> </div>       
        <div class="status green">流拍</div>
      </div>

      <div class="info"> 
      	<a href="<?php echo BASE_SITE_URL;?>/index.php?act=order&op=ordersellerdetail&auction_id=<?php echo $val['id'];?>">      
        <div class="content">
          <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$val['auction_add_date'].'/'.$val['auction_img1'];?>);"> </div>
          <div class="desc"><?php echo bearshop_auction_description_substr($val['auction_description']);?></div>
          <ul>        
            <li><span>发布时间：</span><?php echo date("Y-m-d H:i:s",$val['add_time']);?></li>
             <li><span>流拍时间：</span><?php echo date("Y-m-d H:i:s",$val['end_time']);?></li>
          </ul>
        </div>
        </a> 
     </div>
      <div class="tools">
      		  <button class="xiajiapaipin" aid="<?php echo $val['id'];?>">下架</button>
      	      <button class="liupaidel" aid="<?php echo $val['id'];?>">立即删除</button>
      </div>
    </div>
    <?php }?>
    <?php }?>
  </div>
</div>
<script type="text/javascript">
$(function(){
	$('.xiajiapaipin').click(function(){
		if(confirm('确认下架？')){
			var auction_id = $(this).attr('aid');
			var state = '1';
			$.ajax({
				type:'get',
				url:'index.php?act=my&op=updatestate',
				data:{auction_id:auction_id,is_state:state},
				dataType:'json',
				success:function(data){
					if(data.state == 1){
						location.reload();
					}				
				}
			});
			return false;
		}	
	});	
	
	$('.liupaidel').click(function(){
		if(confirm('确认删除？')){
			var aid = $(this).attr('aid');
			$.ajax({
				type:'post',
				url:'index.php?act=my&op=sellerorderliupai',
				data:{aid:aid},
				dataType:'json',
				success:function(data){
					if(data.state){
						location.reload();
					}
					return false;
				}
			});
		}
	});
});
</script>
<?php include template('home/nav');?>
</body>
</html>
